﻿package view.prompt
{
    import com.core.*;
    import com.greensock.*;
    import com.greensock.easing.*;
    import flash.display.*;
    import flash.events.*;
    import morn.core.handlers.*;

    public class BusinessPrompt extends ButtonPromptCell
    {
        private var tweenMax:TweenMax;

        public function BusinessPrompt()
        {
            return;
        }// end function

        override public function createCell(param1:Sprite, param2:Object, param3:Handler) : void
        {
            super.createCell(param1, param2, param3);
            btn.x = 13;
            btn.y = 5;
            return;
        }// end function

        override public function show(param1:Object) : void
        {
            super.show(param1);
            if (this.tweenMax == null)
            {
                this.alpha = 1;
                this.tweenMax = TweenMax.to(this, 0.6, {alpha:0, yoyo:true, repeat:int.MAX_VALUE, ease:Sine.easeIn});
            }
            return;
        }// end function

        override public function hide() : void
        {
            if (this.tweenMax != null)
            {
                this.tweenMax.kill();
                this.tweenMax = null;
            }
            return;
        }// end function

        override protected function doMouse(event:MouseEvent) : void
        {
            super.doMouse(event);
            ModelProxy.change("zone", "showRequest", null);
            return;
        }// end function

    }
}
